package com.twetec.cms.model.vo.base;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

@ApiModel("树模型")
public class BaseTreeVO<T> implements Serializable  {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "分类Id", example = "12345646546")
    private Long id;

    @ApiModelProperty(value = "分类名称", example = "分类1")
    private String name;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "上级分类id", example = "123123123")
    private Long pid;

	@ApiModelProperty(value = "当前树对应子级集合")
	private List<T> childList;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public List<T> getChildList() {
        return childList;
    }

    public void setChildList(List<T> childList) {
        this.childList = childList;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
}

